﻿using Alos.IRepository;
using Alos.IService;
using PetaPoco;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Alos.Entity;
using Alos.Common;
using System.Threading.Tasks;

namespace Alos.Service
{
    public class ReClassSignService : BaseService<ReClassSign>, IReClassSignService
    {
        IReClassSignRepository ReClassSignRepository;

        public ReClassSignService(IReClassSignRepository _IReClassSignRepository)
        {
            ReClassSignRepository = _IReClassSignRepository;
        }
        public async Task<List<ReClassSign>> GetReClassSign(int id, int ReType)
        {
            return  ReClassSignRepository.GetReClassSign(id, ReType).ToList();
        }
        /// <summary>
        /// 添加学生课堂标记
        /// </summary>
        /// <param name="reclasssign">学生课堂标记</param>
      
        /// <returns></returns>
        public int CreatReClassSign(ReClassSign reclasssign)
        {
            return ReClassSignRepository.CreatReClassSign(reclasssign);
        }
        /// <summary>
        /// 根据备课编号,学生ID SignContent ReType删除学生课堂标记
        /// </summary>
        /// <param name="LessionID">备课编号</param>
        /// <param name="stuId">学生ID</param>
        ///<param name="SignContent">类型 点赞0,一般1，差评2</param>
        /// <param name="ReType">类型  课堂点评0，结束上课点评1</param>
        /// <returns></returns>
       
        public int DeleteReClassSign(int LessionID, int stuId, int SignContent, int ReType)
        {
            return ReClassSignRepository.DeleteReClassSign(LessionID, stuId, SignContent,  ReType);
        }
    }
}
